import sys

sys.path.append('.')
from config.config import Config
import logging
import os


# ====================
# dev environment config
# ===============================


class LocalConfig(Config):
    DEBUG = True
    RELOAD = True
    HOST = '0.0.0.0'
    RPC_PORT = 5001
    HTTP_PORT = 5002
    HTTP_CONFIG = {
        # "redoc_url": None,
        # "docs_url": None,
        "title": 'Pool',
        "description": 'This project is a auto sell pool.',
        "version": "1.0"
    }
    MYSQL_HOST = os.environ.get("MYSQL_SELL_HOST")
    MYSQL_PORT = os.environ.get("MYSQL_SELL_PORT")
    MYSQL_USER = os.environ.get("MYSQL_SELL_USER")
    MYSQL_PASSWORD = os.environ.get("MYSQL_SELL_PASSWORD")
    MYSQL_DB_NAME = "auto_sell_pool"

    SECRET_KEY = os.environ.get("JWT_SECRET_KEY")

    ALGORITHM = "HS256"
    ACCESS_TOKEN_EXPIRE_MINUTES = 60*24*15
    ADD_EXCEPTION_HANDLERS = True

    COS_SECRET_ID = 'AKIDzmMhmtmPmtlOluwkLj8RaXF2d190oTv9'  # 替换为用户的 SecretId，请登录访问管理控制台进行查看和管理，https://console.cloud.tencent.com/cam/capi
    COS_SECRET_KEY = os.environ.get("COS_SECRET_KEY")
    COS_REGION = None  # 通过自定义域名初始化不需要配置region
    COS_TOKEN = None  # 如果使用永久密钥不需要填入token，如果使用临时密钥需要填入，临时密钥生成和使用指引参见https://cloud.tencent.com/document/product/436/14048
    COS_SCHEME = 'https'  # 指定使用 http/https 协议来访问 COS，默认为 https，可不填

    COS_DOMAIN = 'cdn.herblee.cn'
    COS_BUCKET = 'auto-sell-1300254401'

